home *** CD-ROM | disk | FTP | other *** search
- package com.sun.java.swing.plaf.basic;
-
- import java.awt.Component;
- import java.awt.Point;
- import java.awt.Rectangle;
- import java.awt.event.MouseEvent;
- import java.awt.event.MouseMotionAdapter;
- import java.util.EventObject;
-
- class BasicComboPopup$InvocationMouseMotionListener extends MouseMotionAdapter {
- // $FF: synthetic field
- BasicComboPopup this$0;
-
- public void mouseDragged(MouseEvent e) {
- if (this.this$0.isVisible()) {
- MouseEvent newEvent = this.this$0.convertMouseEvent(e);
- Rectangle r = new Rectangle();
- this.this$0.list.computeVisibleRect(r);
- if (newEvent.getPoint().y >= r.y) {
- int var10001 = r.y + r.height;
- if (newEvent.getPoint().y <= var10001 - 1) {
- this.this$0.hasEntered = true;
- if (this.this$0.isAutoScrolling) {
- this.this$0.stopAutoScrolling();
- }
-
- Point location = newEvent.getPoint();
- if (r.contains(location)) {
- this.this$0.valueIsAdjusting = true;
- this.this$0.updateListBoxSelectionForEvent(newEvent, false);
- this.this$0.valueIsAdjusting = false;
- }
-
- return;
- }
- }
-
- if (this.this$0.hasEntered) {
- int directionToScroll = newEvent.getPoint().y < r.y ? 0 : 1;
- if (this.this$0.isAutoScrolling && this.this$0.scrollDirection != directionToScroll) {
- this.this$0.stopAutoScrolling();
- this.this$0.startAutoScrolling(directionToScroll);
- } else if (!this.this$0.isAutoScrolling) {
- this.this$0.startAutoScrolling(directionToScroll);
- }
- } else if (e.getPoint().y < ((Component)((EventObject)e).getSource()).getBounds().y) {
- this.this$0.hasEntered = true;
- this.this$0.startAutoScrolling(0);
- }
- }
-
- }
-
- // $FF: synthetic method
- BasicComboPopup$InvocationMouseMotionListener(BasicComboPopup this$0) {
- this.this$0 = this$0;
- }
- }
-